<%@ page import="javax.naming.Context" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.naming.NamingException" %>
<%@ page import="com.wuchao.service.serviceImpl.ServiceDatasourceImpl" %>
<%@ page import="com.wuchao.entity.User" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Root404
  Date: 2022/7/4
  Time: 14:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="${pageContext.request.contextPath}/ServletUserConroller">点我查询</a>


<%--<%
    try {
        Context ct=new InitialContext();//得到上下文对象
        String lookup = (String) ct.lookup("java:comp/env/t151");
        out.print(lookup);
    } catch (NamingException e) {
        e.printStackTrace();
    }
    ServiceDatasourceImpl serviceDatasource = new ServiceDatasourceImpl();
    List<User> poJo = serviceDatasource.findPoJo("select * from user");
    out.print(poJo.get(0).getName());
%>--%>
</body>
</html>
